<div class="vheader">
    <h1><?php echo $this->translate("Savings account") ?></h1>
    <p><?php echo $this->SavingsAccounts->d->ClientFullName ?>
</div>

<div class="vcontent">

    <img class="shadow" src="/default/photo/full/cat/i/id/<?php echo $this->SavingsAccounts->d->ClientId ?>" />

    <div class="cell">
        <dl>
            <dt><?php echo $this->translate("Product") ?></dt>
            <dd><?php echo $this->SavingsAccounts->d->SavingsProductName ?></dd>
            <dt><?php echo $this->translate("Balance") ?></dt>
            <dd><b><?php echo $this->SavingsAccounts->d->Balance ?></b></dd>
            <dt><?php echo $this->translate("Client") ?></dt>
            <dd><?php echo $this->link('/admin/client/view',array('id'=>$this->SavingsAccounts->d->ClientId),$this->SavingsAccounts->d->ClientFullName) ?>
                <?php echo $this->replaceEmpty($this->SavingsAccounts->d->ClientCode, '', '<br />') ?> <?php echo $this->SavingsAccounts->d->ClientCode ?>
                <br /><?php echo $this->SavingsAccounts->d->ClientId ?>
            </dd>
            <dt><?php echo $this->translate("Country") ?></dt>
            <dd><?php echo $this->SavingsAccounts->d->Country ?></dd>
            <dt><?php echo $this->translate("Group") ?></dt>
            <dd><?php echo $this->replaceEmpty($this->SavingsAccounts->d->GroupName, $this->translate("Individual")) ?>
                <?php echo $this->replaceEmpty($this->SavingsAccounts->d->GroupName,'','<br />') ?>
                <?php echo $this->SavingsAccounts->d->GroupId ?></dd>
            <dt><?php echo $this->translate("L. officer") ?></dt>
            <dd><?php echo $this->link('/admin/officer/view',array('id'=>$this->SavingsAccounts->d->OfficerUserId),$this->SavingsAccounts->d->OfficerFullName) ?></dd>
            <dt><?php echo $this->translate("Branch") ?></dt>
            <dd><?php echo $this->link('/admin/location/view',array('id'=>$this->SavingsAccounts->d->LocationId),$this->SavingsAccounts->d->LocationName) ?></dd>
            <dt><?php echo $this->translate("Community") ?></dt>
            <dd><?php echo $this->SavingsAccounts->d->Community ?>
                <?php echo $this->replaceEmpty($this->SavingsAccounts->d->CommunityType,'','<br />') ?> <?php echo $this->SavingsAccounts->d->CommunityType ?></dd>
            </dl>
    </div>

    <div class="cell">
        <dl>
            <dt></dt>
            <dd><b><?php echo $this->translate("Last transaction") ?></b></dd>
            <dt><?php echo $this->translate("Date") ?></dt>
            <dd><?php echo $this->SavingsAccounts->d->LastTransactionDate ?></dd>
            <dt><?php echo $this->translate("Amount") ?></dt>
            <dd><?php echo $this->SavingsAccounts->d->LastTransactionAmount ?></dd>
            <dt><?php echo $this->translate("Type") ?></dt>
            <dd><?php echo $this->SavingsAccounts->d->LastTransactionType ?></dd>
            <dt><?php echo $this->translate("Registered by") ?></dt>
            <dd><?php echo $this->SavingsAccounts->d->LastTransactionUserFullName ?></dd>
        </dl>    
    </div>

    <div class="cell">
        <dl>
            <dt></dt><dd></dd>
        </dl>    
    </div>
    
</div>

<!--
<div class="vgrid">
    <?php // echo $this->partial('partials/grid.phtml', $this->loanStatusChanges); ?>
</div>
-->    

<div class="vfooter">
    <div class="menu">
        <?php echo $this->link('/savings/savings-transaction/browse', array('ClientId'=>$this->SavingsAccounts->d->ClientId,'ClientFirstName'=>$this->SavingsAccounts->d->ClientFirstName),$this->translate("Transactions"),array('target'=>'bottom')) ?>  
        <?php echo $this->link('/savings/savings-deposit/add', array('client'=>$this->SavingsAccounts->d->ClientId),$this->translate("Make deposit")) ?>  
        <?php echo $this->link('/savings/savings-withdrawal/add', array('client'=>$this->SavingsAccounts->d->ClientId),$this->translate("Make withdrawal")) ?>  
        
        <?php //echo $this->printLink() ?>     
    </div>
</div>